package com.log4j.kafka.utils;

import org.apache.log4j.Level;
import org.apache.log4j.Logger;
import org.apache.log4j.net.SyslogAppender;

/**
 * Created by yangshunxing on 2017/5/10.
 */
public class RecordLog {
    private static Logger logger = Logger.getLogger(RecordLog.class);

    private static class RecordLevel extends Level{
        private static final long serialVersionUID = 1076913470822079835L;
        private RecordLevel(int level, String name, int sysLogLevel){
            super(level,name,sysLogLevel);
        }
    }
    private static final Level RECORD_LOG_LEVEL = new RecordLevel(
            20050, "record", SyslogAppender.LOG_LOCAL0);

    public static void recordLog(Object pm_objLogInfo) {
        logger.log(RECORD_LOG_LEVEL, pm_objLogInfo);
    }
}
